package com.gaofans.vertx.boot.common.verticle;

import org.springframework.context.annotation.Scope;
import org.springframework.core.annotation.AliasFor;
import org.springframework.stereotype.Component;

import java.lang.annotation.*;

import static org.springframework.beans.factory.config.ConfigurableBeanFactory.SCOPE_PROTOTYPE;
import static org.springframework.beans.factory.config.ConfigurableBeanFactory.SCOPE_SINGLETON;

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE,ElementType.METHOD})
@Documented
@Component
@Scope(SCOPE_PROTOTYPE)
public @interface Verticle {

    @AliasFor(annotation = Component.class)
    String value() default "";

    @AliasFor(annotation = Scope.class)
    String scopeName() default SCOPE_SINGLETON;

    Class<? extends ResultHandlerBuilder> handler() default NoneResultHandlerBuilder.class;

    Class<? extends DeploymentOptionsBuilder> options() default DefaultDeploymentOptionsBuilder.class;

}
